package cn.pupil.demo.design.domain.service.engine;

import cn.pupil.demo.design.domain.service.logic.impl.UserGenderFilter;
import cn.pupil.demo.design.domain.service.logic.LogicFilter;
import cn.pupil.demo.design.domain.service.logic.impl.UserAgeFilter;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Description:
 * @Author: pupil
 * @Date: 2024/07/25 下午 4:39
 */
public class EngineConfig {

    public static Map<String, LogicFilter> logicFilterMap;

    static {
        logicFilterMap = new ConcurrentHashMap<>();
        logicFilterMap.put("userAge", new UserAgeFilter());
        logicFilterMap.put("userGender", new UserGenderFilter());
    }


   public static LogicFilter getLogicFilter(String name){
        return logicFilterMap.get(name);
   }
}
